package com.time.sky.controller;

import com.time.sky.entity.Officemoney;
import com.time.sky.mapper.OfficemoneyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
public class OfficemoneyController {
    @Autowired
    private OfficemoneyMapper officemoneyMapper;


    @RequestMapping("/Officemoney/selectOfficemoneyList")
    public List<Officemoney> selectOfficemoneyList(@RequestBody  Officemoney officemoney){
        List<Officemoney> officemonies = officemoneyMapper.selectOfficemoney(officemoney);
        return officemonies;
    }
    @RequestMapping("/Officemoney/findAll")
    public List<Officemoney> findAll(){
        List<Officemoney> officemonies = officemoneyMapper.findAll();
        return officemonies;
    }

}
